package com.woniuxy04;

import com.woniuxy04.Student;

import java.util.Arrays;

/**
 * @author 作者
 * @create 2025-06-03 16:37
 */
public class Test01 {
    public static void main(String[] args) {
        test02();
    }

    private static void test02() {
        Student[] students = new Student[3];
        students[0] = new Student("zs",11);
        students[1] = new Student("ls",15);
        students[2] = new Student("ww",13);
        System.out.println("排序前: " + Arrays.toString(students));
        Arrays.sort(students);
        System.out.println("排序后: " + Arrays.toString(students));
    }

    private static void test01() {
        int[] a = {1, 7, 2, 9, 3, 6, 4, 5};
        Arrays.sort(a);
        System.out.println(Arrays.toString(a));
        String[] strs = {"aaa", "aa", "bbb", "abc", "bcd"};
        Arrays.sort(strs);
        System.out.println(Arrays.toString(strs));
    }
}
